﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data.Entity;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using LabChecker.Models;

namespace LabChecker
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "CheckService" in code, svc and config file together.
    public class CheckService : ICheckService
    {        
        public void DoWork()
        {
        }

        public Task GetTask(int id)
        {
            using (var context = new LabCheckerContext(disableProxies: true))
            {
                var task = context.Tasks.Include(t => t.TestCases).Single(t => t.Id == id);
                return task;
            }
        }


        public string Test(string name)
        {
            return "Hello " + name;
        }
    }
}
